﻿@using System.Globalization
@model GoldUSD.Models.MainContentModel
<table width="100%">
    <tr>
        <td width="50%">
            - Trang web tạm khi gặp sự cố : <span style="font-size: 20px;font-weight: bold">GOLDUSD.MOV.MN</span>
            <br/>
            - Làm việc từ thứ 2 đến thứ 7 hàng tuần,Chủ nhật và ngày lễ nghỉ
        </td>
        <td>
            - LIÊN HỆ KỸ THUẬT: 0917816156 gặp Tuấn khi có sự cố
        </td>
    </tr>
</table>
<div id="leftContent" style="width: 49%;float:left;border-right: 1px dotted #ccc;padding:0px;">
    <iframe width="100%" height="835" frameborder="0" style="margin:0px;line-height: 0px;padding: 0px;overflow:hidden" allowtransparency="true" src="@string.Format("http://vip2.giavang.net/teline2/data/GoldenPrice2.php?mode=count&dict=&tt={0}",
                                                                                                                                                                    DateTime.Now.ToString("ddMMyyyyhhmmssffff"))" border="0" scrolling="no" ></iframe>
    <div style="font-size: 20px;font-weight: bold;">Tin tức</div>
    <div>
        @Html.Raw(Model.Content)
    </div>
</div>
<div id="rightContent" style="width: 49%;float:right;">
    @{
        foreach (var priceType in Model.PriceTypes)
        {
            <table width="100%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#cccccc"
                   style="border-collapse: collapse">
                <tr>
                    <td height="30" colspan="5" align="center" bgcolor="#999999">
                        <span class="titletext1"><font color="#FFFFFF">@priceType.Name.ToUpper()</font></span>
                    </td>
                </tr>
                <tr>
                    <td width="100" height="30" align="center" bgcolor="#CC0000">
                        <span class="menutext">SYMBOL</span>
                    </td>
                    <td width="100" align="center" bgcolor="#CC0000">
                        <span class="menutext">MUA VÀO</span>
                    </td>
                    <td width="100" align="center" bgcolor="#CC0000">
                        <span class="menutext">BÁN RA </span>
                    </td>
                </tr>
                <tr>
                    <td colspan="3" align="center" bordercolor="#e3dfdf" valign="top">
                        <table cellspacing="0" cellpadding="0" width="100%" bgcolor="#cccccc" border="0" align="center">
                            <tbody>
                                @{
                                    int count = 1;
                                    foreach (var price in priceType.Prices)
                                    {
                                        <tr @{
                                                if (count%2 > 0)
                                                {
                                                    <text>style = "height: 25px; background-color: #e3dfdf"</text>
                                                }
                                            }  >
                                            <td width="100" height="25" align="center" valign="middle" class="contenttextb">
                                                @price.Symbol.ToUpper()
                                            </td>
                                            <td width="100" height="25" align="right" valign="middle" class="contenttextb">
                                                @price.BuyingPrice
                                            </td>
                                            <td width="100" height="25" align="right" valign="middle" class="contenttextb">
                                                @price.SellingPrice
                                            </td>
                                        </tr>
                                        count++;
                                    }
                                }
                                    
                                <tr>
                                    <td height="5" align="center" valign="middle" bgcolor="#FFFF66">
                                    </td>
                                    <td height="5" align="center" valign="middle" bgcolor="#FFFF66">
                                    </td>
                                    <td height="5" align="center" valign="middle" bgcolor="#FFFF66">
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </td>
                </tr>
            </table>
            <br />
        }
    }
    <div style="font-size: 20px;font-weight: bold;">Ngoại tệ thế giới</div>
    <div>
        <iframe frameborder="0" scrolling="auto" style="width:100%; height:250px; display:block; border:none; " src="http://classic.easy-forex.com/en/forex.quotesbox.aspx" ></iframe>
    </div>
    <br/>
    <div style="font-size: 20px;font-weight: bold;">Ngoại tệ ngân hàng</div>
    <table width="100%" cellspacing="1" cellpadding="0" style="background-color: #ffffff">
        <tbody>
        <tr>
            <td height="20" align="left" colspan="4">
                <span class="style8">Cập nhật: @DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss")</span>
            </td>
        </tr>
        <tr class="header">
            <th width="17%">Tên</th>
            <th width="28%">Mua</th>
            <th width="28%">Chuyển khoản</th>
            <th width="27%">Bán</th>
        </tr>
        @*@{
            int countVcb = 1;
            foreach (var item in Model.VcbCurrencies)
            {
                <tr class="@(countVcb % 2 > 0 ? "row1" : "row2")">
                    <th>@item.Code</th>
                    <td class="price1">@item.Buy</td>
                    <td class="price3">@item.Transfer</td>
                    <td class="price2">@item.Sell</td>
                </tr>
                countVcb++;
            }
        }*@
        <tr>
            <td class="note1" colspan="4">
                Nguồn : vietcombank.com.vn
                <br>
                <span class="style11">Tỷ giá chỉ mang tính tham khảo.</span>
            </td>
        </tr>
    </table>
</div>